import { configureStore } from '@reduxjs/toolkit'

import cartReducer from './modules/cartStore'
import userReducer from './modules/usersStore'


export const store = configureStore({
    reducer:{
        cart:cartReducer,
        user:userReducer
    }
})

export default store

//导出类型的 hooks 
export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch